/*
 * @Author: MiNine
 * @Date: 2020-09-21 12:57:11
 * @LastEditors: MiNine
 * @LastEditTime: 2020-09-23 18:51:11
 * @Description: 
 */
import axios from '../../axios';
const INSURE_ORDER_URL = '/insureOrder';
const insureOrderApi = {
  /**
   * @name: 新增保险订单
   * @param data object
   * @return object 
   */
  addInsureOrder: function (data) {
    return axios({
      url: INSURE_ORDER_URL + '/addOrder',
      method: 'post',
      data
    });
  },
  /**
   * @name: 删除保险订单
   * @param data object{_id} 订单id
   * @return object 
   */
  delInsureOrder: function (data) {
    return axios({
      url: INSURE_ORDER_URL + '/delOrder',
      method: 'post',
      data
    });
  },
  //修改状态
  putInsureOrder_status: function (data) {
    return axios({
      url: INSURE_ORDER_URL + '/modOrderStatus',
      method: 'post',
      data
    });
  },
  //修改
  putInsureOrder: function (data) {
    return axios({
      url: INSURE_ORDER_URL + '/modOrder',
      method: 'post',
      data
    });
  },
  /**
   * 根据 操作员id 获取 操作员下面所有订单
   * @param {adminId} params 
   */
  getInsureOrders: function (params) {
    return axios({
      url: INSURE_ORDER_URL + '/getOrders',
      method: 'get',
      params
    });
  },
  /**
   * 根据_id获取单个订单所有信息
   * @param {Object} params 传递_id
   */
  getInsureOrder: function (params) {
    return axios({
      url: INSURE_ORDER_URL + '/getOrder',
      method: 'get',
      params
    });
  }

}

export default insureOrderApi;